# 元组拆包：将元组内部的元素按照对应位置 一一赋值给不同的变量
info = ('zhangsan','male',19)
name,gender,age = ('zhangsan','male',19)
print(name,gender,age)

# 使用占位符
_,_,age = ('zhangsan','male',19)
print(age)

# 元素很多
a, b, *rest, c, d = range(10)
print(a, b, c, d)
print(rest)
print(type(rest)) # <class 'list'>

# 快速交换
num1 = 10
num2 = 5
num1, num2 = num2, num1
print(num1, num2)
